<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:42:"D:\www\crm/app/index\view\stocks\edit.html";i:1517471201;s:35:"D:\www\crm/app/index\view\base.html";i:1512719636;}*/ ?>
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>山东归仁生物科技有限公司<?php echo HTRConf('CONF.appName'); ?></title>
<meta name="Keywords" content=""/>
<meta name="Description" content=""/> 
<link href="__INDEX__/js/ligerui/skins/Aqua/css/ligerui-all.css?v=<?php echo $v; ?>" rel="stylesheet" type="text/css" /> 
<link href="__STATIC__/plugins/validator/jquery.validator.css?v=<?php echo $v; ?>" rel="stylesheet">

<link href="__INDEX__/css/style.css?v=<?php echo $v; ?>" rel="stylesheet" type="text/css" />   
<script src="__STATIC__/js/jquery.min.js?v=<?php echo $v; ?>"></script>  
<script src="__INDEX__/js/ligerui/js/ligerui.all.js?v=<?php echo $v; ?>" type="text/javascript"></script> 
<script type='text/javascript' src='__STATIC__/plugins/layer/layer.js?v=<?php echo $v; ?>'></script> 
<script src="__STATIC__/js/common.js?v=<?php echo $v; ?>"></script>
<script>
window.conf = {"ROOT":"__ROOT__","APP":"__APP__","STATIC":"__STATIC__","SUFFIX":"<?php echo config('url_html_suffix'); ?>","USER_LOGO":"<?php echo HTRConf('CONF.userLogo'); ?>",'GRANT':'<?php echo implode(",",session("HTR_STAFF.privileges")); ?>'}
</script>
<script src="__INDEX__/js/common.js?v=<?php echo $v; ?>"></script>
<script type="text/javascript" src="__STATIC__/plugins/validator/jquery.validator.js?v=<?php echo $v; ?>"></script>
<script type="text/javascript" src="__STATIC__/plugins/validator/local/zh-CN.js?v=<?php echo $v; ?>"></script>
</head>
<body>

<div class="l-loading" style="display: block" id="htr-loading"></div>
<form id='editFrom' autocomplete='off'>
<input type='hidden' id='stockId' class='ipt' value="<?php echo $object['stockId']; ?>"/>
<table class='htr-form htr-box-top'>
  <?php if($object['stockId']): ?>
  <input type='hidden' id='shopId' class='ipt' value="<?php echo $object['shopId']; ?>"/>
  <input type='hidden' id='goodsId' class='ipt' value="<?php echo $object['goodsId']; ?>"/>
  <tr>
     <th width='150'>店铺名称<font color='red'>*</font>：</th>
     <td><?php echo $shop['shopName']; ?> - (<?php echo $shop['shopSn']; ?>)</td>
  </tr>
  <tr>
     <th>商品名称<font color='red'>*</font>：</th>
     <td><?php echo $goods['goodsName']; ?> - (<?php echo $goods['goodsSn']; ?>)</td>
  </tr>
  <?php else: if($shopId): ?>
  <input type='hidden' id='shopId' class='ipt' value="<?php echo $shopId; ?>"/>
  <tr>
     <th width='150'>店铺名称<font color='red'>*</font>：</th>
     <td><?php echo $shop['shopName']; ?> - (<?php echo $shop['shopSn']; ?>)</td>
  </tr>
  <?php else: ?>
  <tr>
     <th width='150'>店铺名称<font color='red'>*</font>：</th>
     <td>      
      <select id="shopId" name='shopId' class='ipt'>
        <option value="">-请选择-</option>     
        <?php if(is_array($shopList) || $shopList instanceof \think\Collection): $i = 0; $__LIST__ = $shopList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
        <option value="<?php echo $vo['shopId']; ?>"<?php if($vo['shopId']==$shopId): ?> selected<?php endif; ?>><?php echo $vo['shopName']; ?> - (<?php echo $vo['shopSn']; ?>)</option>
        <?php endforeach; endif; else: echo "" ;endif; ?>
      </select>
    </td>
  </tr>
  <?php endif; ?>
  <tr>
     <th>商品名称<font color='red'>*</font>：</th>
     <td>
      <select id="goodsId" name='goodsId' class='ipt'>
        <option value="">-请选择-</option>  
        <?php if(is_array($goodsList) || $goodsList instanceof \think\Collection): $i = 0; $__LIST__ = $goodsList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
        <option value="<?php echo $vo['goodsId']; ?>"<?php if($vo['goodsId']==$object['goodsId']): ?> selected<?php endif; ?>><?php echo $vo['goodsName']; ?> - (<?php echo $vo['goodsSn']; ?>)</option>
        <?php endforeach; endif; else: echo "" ;endif; ?>
      </select>
    </td>
  </tr>
  <?php endif; ?>
  <!-- <tr>
     <th>库存数量<font color='red'>*</font>：</th>
     <td><input type="text" id='goodsStock' class='ipt' value="<?php echo $object['goodsStock']; ?>" maxLength='20' data-rule="库存数量: required"/></td>
  </tr> -->
  <tr>
     <th>缺货警告<font color='red'>*</font>：</th>
     <td><input type="text" id='cautionNum' class='ipt' value="<?php echo $object['cautionNum']; ?>" maxLength='20' data-rule="缺货警告: required"/></td>
  </tr>
  <tr>
     <td colspan='2' align='center'>
       <input type='button' value='保存' class='btn btn-blue' onclick='javascript:save()'>
       <input type='button' value='返回' class='btn' onclick='javascript:history.go(-1)'>
     </td>
  </tr>
</table>
</form>


<script src="__INDEX__/stocks/stocks.js?v=<?php echo $v; ?>" type="text/javascript"></script>

<script>
function showImg(opt){
	layer.photos(opt);
}
function showBox(opts){
	return HTR.open(opts);
}
</script>
</body>
</html>